package com.thd.springboottest.camunda.servicetask;

import com.thd.springboottest.camunda.service.WorkFlowService;
import com.thd.springboottest.camunda.utils.SpringUtils;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;

/**
 * com.thd.springboottest.camunda.servicetask
 *
 * @author: wanglei62
 * @DATE: 2022/6/1 11:19
 **/

public class MyServiceTask implements JavaDelegate {
    @Override
    public void execute(DelegateExecution delegateExecution) throws Exception {
        WorkFlowService workFlowService = (WorkFlowService) SpringUtils.getBean("WorkForServiceImplForCamunda");
        System.out.println(workFlowService);

        System.out.println("Service Task 流程实例ID：" + delegateExecution.getProcessInstanceId());
    }
}

